#include "StdAfx.h"
#include "Random.h"


CRandom::CRandom(UINT seed)
:m_Seed(seed)
{

}


CRandom::~CRandom(void)
{
}

INT CRandom::Rand()
{
	return (((m_Seed = m_Seed * 214013L + 2531011L)>>16) & 0X7FFF);
}

INT CRandom::SimpleRandom()
{
	return (((m_Seed = m_Seed + 2531011L) >> 3) & 0x7FFF);
}

INT CRandom::ComplexRandom()
{
	return (((m_Seed = m_Seed + 2531011L) >> 3) & 0x7FFF);
}
